package org.relic.enumstudy;

public class EnumStudy02 {
	private enum Color{
		red,blue,green;
		
		private static Color getColor(String flag){
			if(flag.equals("red~")){
				return red;
			}else if(flag.equals("blue~")){
				return blue;
			}else if(flag.equals("green~")){
				return green;
			}else{
				return red;
			}
		}
	}
	
	public static void main(String[] args){
		Color c=Color.getColor("blue~");
		System.out.println(c);
//		EnumStudy02 es=new EnumStudy02();
		
	}
}
